package jdk16;

/**
 * JDK 17 新特性：Records
 */
public class RecordsDemo {
    /**
     * 用户 Model
     */
    public record UserModel(Long userId,
                            String username,
                            String email,
                            String phone) {
    }
    public static void main(String[] args) {
        UserModel userModel = new UserModel(4563208451056741L, "李虎", "264877415@qq.com", "15874401202");
        System.out.println(userModel.username());
        System.out.println(userModel.email);
    }
}